package com.my.study;

public class FloatAndDoubleStudy {

    public static void main(String[] args) {

        float a = 0.1f;
        float b = 0;
        for(int i = 0;i < 20;i++){
            b += a;
            System.out.println(b);
        }
        System.out.println(b);

        System.out.println("================");
        double c = 0.1d;
        double d = 0;
        for(int i = 0;i < 20;i++){
            d += c;
            System.out.println(d);
        }
        System.out.println(d);
    }
}
